home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmBrush
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "PatternBrush-Demo"
- ClientHeight = 3735
- ClientLeft = 1050
- ClientTop = 1800
- ClientWidth = 7365
- DrawStyle = 5 'Transparent
- FillStyle = 0 'Solid
- Height = 4140
- Left = 990
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 3735
- ScaleWidth = 7365
- Top = 1455
- Width = 7485
- Begin PictureBox cmdInfo
- Height = 600
- Left = 270
- Picture = BRUSH.FRX:0000
- ScaleHeight = 570
- ScaleWidth = 570
- TabIndex = 10
- Top = 2940
- Width = 600
- End
- Begin CommandButton cmdSave
- Caption = "&Save Bitmaps to disk"
- Height = 405
- Left = 3060
- TabIndex = 9
- Top = 3120
- Width = 2535
- End
- Begin CommandButton cmdForm
- Cancel = -1 'True
- Caption = " &Ok"
- Default = -1 'True
- Height = 405
- Index = 0
- Left = 5760
- TabIndex = 5
- Top = 3120
- Width = 1365
- End
- Begin PictureBox panel
- Align = 1 'Align Top
- BackColor = &H00C0C0C0&
- ForeColor = &H00800000&
- Height = 675
- Left = 0
- ScaleHeight = 645
- ScaleWidth = 7335
- TabIndex = 1
- Top = 0
- Width = 7365
- Begin PictureBox opt
- Height = 195
- Index = 1
- Left = 5670
- ScaleHeight = 165
- ScaleWidth = 1335
- TabIndex = 7
- TabStop = 0 'False
- Top = 360
- Width = 1365
- End
- Begin PictureBox opt
- Height = 195
- Index = 0
- Left = 5670
- ScaleHeight = 165
- ScaleWidth = 1335
- TabIndex = 6
- Top = 120
- Width = 1365
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 11
- Left = 4230
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 11
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 13
- Left = 4950
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 12
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 12
- Left = 4590
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 13
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 10
- Left = 3870
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 14
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 3
- Left = 1260
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 15
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 7
- Left = 2700
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 16
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 4
- Left = 1620
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 17
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 5
- Left = 1980
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 18
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 2
- Left = 900
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 19
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 6
- Left = 2340
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 20
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 1
- Left = 540
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 21
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 9
- Left = 3510
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 22
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 8
- Left = 3150
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 23
- Top = 150
- Width = 375
- End
- Begin PictureBox cmd
- BackColor = &H00C0C0C0&
- Height = 375
- Index = 0
- Left = 180
- ScaleHeight = 345
- ScaleWidth = 345
- TabIndex = 24
- Top = 150
- Width = 375
- End
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "[ Control_Brush control, any.picture, borderwidth% ]"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00808080&
- Height = 300
- Index = 3
- Left = 990
- TabIndex = 0
- Top = 1890
- Width = 6195
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "This is all you need to do:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = -1 'True
- Height = 300
- Left = 180
- TabIndex = 2
- Top = 930
- Width = 3060
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Brush_Form Me, any.picture"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 300
- Index = 0
- Left = 990
- TabIndex = 3
- Top = 1590
- Width = 3390
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "sub Form_Paint()"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 300
- Index = 1
- Left = 810
- TabIndex = 4
- Top = 1290
- Width = 2085
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "End Sub"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 300
- Index = 2
- Left = 810
- TabIndex = 8
- Top = 2220
- Width = 1050
- End
- Dim curFormBMP%, curPanelBMP%
- Sub cmd_Click (Index As Integer, Value As Integer)
- Dim bmp%
- If Value Then bmp = cmd(Index).PictureUp
- If opt(0) Then
- curFormBMP = bmp
- Else
- curPanelBMP = bmp
- If Value = False Then panel.Refresh
- End If
- Refresh '-- Calls Form_Paint()
- End Sub
- Sub cmdForm_Click (Index As Integer)
- Unload Me
- End Sub
- Sub cmdInfo_Click ()
- frmInfo.Show 1
- End Sub
- Sub cmdSave_Click ()
- Dim i%, n$
- On Error Resume Next
- screen.MousePointer = 11
- For i = 0 To 13
- n = app.Path & "\BRUSH_" & i & ".BMP"
- If FileLen(n) Then
- screen.MousePointer = 0
- MsgBox "Bitmaps already saved!", 48, "Info"
- Exit Sub
- End If
- SavePicture cmd(i).PictureUp, n
- If Err Then
- screen.MousePointer = 0
- MsgBox "Err (#" & Err & ") - Could not save bitmaps!", 48, "Error"
- i = 0
- Exit Sub
- End If
- Next
- screen.MousePointer = 0
- MsgBox "Bitmaps successfully saved to " & app.Path & "\BRUSH_1.BMP - BRUSH13.BMP", 64, "Info"
- End Sub
- Sub Form_Load ()
- frmInfo.Show 1
- form_center Me
- ' Load patterns ( normally not needed )
- ' -------------------------------------
- curFormBMP = cmd(1).PictureUp
- curPanelBMP = cmd(3).PictureUp
- End Sub
- Sub Form_Paint ()
- If opt(0) Then
- brush_form Me, curFormBMP
- Else
- brush_control panel, curPanelBMP, panel.BorderWidth * 4
- End If
- End Sub
- Sub opt_Click (Index As Integer, Value As Integer)
- panel.Refresh
- Refresh
- End Sub
-